\hypertarget{module_8c}{
\section{/home/tech/release/K210-Devkit-CDROM-v1\_\-0\_\-3/subversion/nanostack/Common/module.c File Reference}
\label{module_8c}\index{/home/tech/release/K210-Devkit-CDROM-v1_0_3/subversion/nanostack/Common/module.c@{/home/tech/release/K210-Devkit-CDROM-v1\_\-0\_\-3/subversion/nanostack/Common/module.c}}
}
Protocol extension modules. 

{\tt \#include $<$string.h$>$}\par
{\tt \#include \char`\"{}Free\-RTOS.h\char`\"{}}\par
{\tt \#include \char`\"{}task.h\char`\"{}}\par
{\tt \#include \char`\"{}queue.h\char`\"{}}\par
{\tt \#include \char`\"{}debug.h\char`\"{}}\par
{\tt \#include \char`\"{}stack.h\char`\"{}}\par
{\tt \#include \char`\"{}buffer.h\char`\"{}}\par
{\tt \#include \char`\"{}module.h\char`\"{}}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
port\-CHAR \hyperlink{module_8c_c84c3ac4fb630b84aa64d63ff17f4a42}{module\_\-init} (void)
\item 
\hyperlink{structmodule__t}{module\_\-t} $\ast$ \hyperlink{module_8c_4f20574aabaadc1e814bafacefae9968}{module\_\-get} (module\_\-id\_\-t id)
\item 
port\-CHAR \hyperlink{module_8c_4629394f45f592e201fe8eae88634526}{module\_\-call} (module\_\-id\_\-t id, \hyperlink{structbuffer__t}{buffer\_\-t} $\ast$buffer)
\end{CompactItemize}


\subsection{Detailed Description}
Protocol extension modules. 

Protocol stack extension modules: initialization, module table, management functions 

\subsection{Function Documentation}
\hypertarget{module_8c_4629394f45f592e201fe8eae88634526}{
\index{module.c@{module.c}!module_call@{module\_\-call}}
\index{module_call@{module\_\-call}!module.c@{module.c}}
\subsubsection[module\_\-call]{\setlength{\rightskip}{0pt plus 5cm}port\-CHAR module\_\-call (module\_\-id\_\-t {\em id}, \hyperlink{structbuffer__t}{buffer\_\-t} $\ast$ {\em buffer})}}
\label{module_8c_4629394f45f592e201fe8eae88634526}


Call module handler.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]Protocol ID \item[{\em buffer}]Buffer to be sent to selected module\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]pd\-TRUE handler called 

pd\-FALSE module not found or buffer not handled by module \end{Desc}
\hypertarget{module_8c_4f20574aabaadc1e814bafacefae9968}{
\index{module.c@{module.c}!module_get@{module\_\-get}}
\index{module_get@{module\_\-get}!module.c@{module.c}}
\subsubsection[module\_\-get]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{structmodule__t}{module\_\-t}$\ast$ module\_\-get (module\_\-id\_\-t {\em id})}}
\label{module_8c_4f20574aabaadc1e814bafacefae9968}


Find a protocol module.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]Protocol ID\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]pointer to module structure \end{Desc}
\hypertarget{module_8c_c84c3ac4fb630b84aa64d63ff17f4a42}{
\index{module.c@{module.c}!module_init@{module\_\-init}}
\index{module_init@{module\_\-init}!module.c@{module.c}}
\subsubsection[module\_\-init]{\setlength{\rightskip}{0pt plus 5cm}port\-CHAR module\_\-init (void)}}
\label{module_8c_c84c3ac4fb630b84aa64d63ff17f4a42}


Initialize modules.

\begin{Desc}
\item[Returns:]pd\-TRUE OK 

pd\-FALSE out of resources \end{Desc}
